// 引入express模块
const express = require('express');
//引入连接池模块
const pool = require('../pool')
//引入路由器对象
const r = express.Router();

// 健康方案接口
r.get("/details", (req, res) => {
    var sql = "select * from details";
    pool.query(sql, (err, result) => {
        if (err) throw err;
        res.send({
            message: 'ok',
            code: 200,
            result: result
        }); //表-->字符串json
    })
})

// 导出路由器对象
module.exports = r;